{template header}

<!--{if $webglobal['action'] == 'view'}-->
	<div id="positionBox">
		<div class="left">
			<a href="{WEBURLPATH}/index.php">首页</a>&gt;
			<a href="{WEBURLPATH}/coupon.php">优惠奖券</a>
		</div>
	</div>
	<div id="couponInfoBox">
		<div class="linetitle">{$webglobal['file_coupon']['couponData']['coupon']['name']}</div>
		{if $webglobal['file_coupon']['couponData']['coupon']['image'] != ''}
		<div><img src="{WEBURLPATH}{$webglobal['file_coupon']['couponData']['coupon']['thumbnail']['big']}" alt="{$webglobal['file_coupon']['couponData']['coupon']['name']}" title="{$webglobal['file_coupon']['couponData']['coupon']['name']}" /></div>
		{/if}
		<div class="couponInfo">
			<span class="priceAfter">{$webglobal['file_coupon']['couponData']['coupon']['price']}</span>
			<span class="priceBefore">原价:￥{$webglobal['file_coupon']['couponData']['coupon']['original']}</span>
			<span class="expTime">有效期为：{$webglobal['file_coupon']['couponData']['coupon']['endtime_show']}</span>
			<p>{$webglobal['file_coupon']['couponData']['coupon']['introduction']}</p>
			{if $webglobal['file_coupon']['couponData']['coupon']['isabled']}
			<a href="#" class="printA">打印优惠券</a>
			{/if}
			<!-- <a href="#" class="message">免费短信下载</a> -->
			
			<div class="shareBox">
				<DIV class=bshare-custom><A class=bshare-qzone title=分享到QQ空间 href="javascript:void(0);"></A><A class=bshare-sinaminiblog title=分享到新浪微博 href="javascript:void(0);"></A><A class=bshare-renren title=分享到人人网 href="javascript:void(0);"></A><A class=bshare-qqmb title=分享到腾讯微博 href="javascript:void(0);"></A><A class=bshare-douban title=分享到豆瓣 href="javascript:void(0);"></A><A class="bshare-more bshare-more-icon more-style-addthis" title=更多平台></A></DIV>
				<SCRIPT type=text/javascript charset=utf-8 src="http://static.bshare.cn/b/buttonLite.js#style=-1&amp;uuid=&amp;pophcol=3&amp;lang=zh"></SCRIPT>
				<SCRIPT type=text/javascript charset=utf-8 src="http://static.bshare.cn/b/bshareC0.js"></SCRIPT>
			</div>
			
			<a href="{WEBURLPATH}/coupon.php?action=favorite&id={$webrequest['id']}" class="collect">收藏</a>
		</div>
		<div class="blocktitle">
			<strong>商户信息</strong>
			<span></span>
			<a href="{WEBURLPATH}/company.php?action=view&id={$webglobal['file_coupon']['couponData']['company']['id']}" class="couponCompanymore">查看更多信息</a>
		</div>
		<div class="clear"></div>
		<div>
			<div class="couponCompanyName">{$webglobal['file_coupon']['couponData']['company']['name']}</div>
			<span class="couponCompanyaddress">地址:{$webglobal['file_coupon']['couponData']['company']['address']} 电话:{$webglobal['file_coupon']['couponData']['company']['tel']}</span>
			<!-- <a href="#" class="map">地图</a> -->

		</div>
		<div class="blocktitle"><strong>用户签到</strong><span></span></div><div class="clear"></div>
		<ul class="companyComment">
			{if $webglobal['file_coupon']['datanum'] > 0}
				{loop $webglobal['file_coupon']['checkin'] $checkkey $tempdata}
				<li>
				{if $tempdata['avatar'] != ''}
					<img class="img" height="48" width="48" src="{WEBURLPATH}{$tempdata['avatar']}"></a>
				{else}
					<img class="img" height="48" width="48" src="{WEBURLPATH}/images/dfboy.png"></a>
				{/if}
				<span href="#" class="user">{$tempdata['personname']}</span>
				{if $tempdata['addtime']}
				<span href="#" class="time">签到时间:{$tempdata['addtime']}</span>
				{/if}
				{if $tempdata['inquiry_title']}
				<p class="inquiry">{$tempdata['inquiry_title']}: {$tempdata['inquiry_result']}</p>
				{/if}
				<p class="intro">{$tempdata['content']}</p>
				</li>
				{/loop}
				{template page}
			{else}
				<li>没有该商家的签到信息</li>
			{/if}
		</ul>
	</div>
	<div class="couponRight">
		<div class="couponTipBox">
			<div class="tit"><a href="#" class="left">温馨提示</a></div>
			<div class="cont"><p>  在快速发展中截止到2011年第三季度，247vip每月浏览量超过5亿，其中手机客户端的月浏览量已经占到网站月浏览量的60%以上，手机独立用户数超过1300万。
在快速发展中截止到2011年第三季度，247vip每月浏览量超过5亿，其中手机客户端的月浏览量已经占到网站月浏览量的60%以上，手机独立用户</p>
			</div>
		</div>
		<div class="hotCoupon">
			<div class="tit"><a href="#" class="left">商户发布相关优惠券</a></div>
			<ul class="cont">
				{loop {$webglobal['file_coupon']['couponData']['othercoupon']} $couponid $coupon}
				<li>
					<a href="{WEBURLPATH}/coupon.php?action=view&id={$coupon[id]}" class="img">
						<img src="{WEBURLPATH}{if $coupon[image]!=''}{$coupon[thumbnail][small]}{else}/images/nopic-small.png{/if}" alt="{$coupon[name]}" />
					</a>
					<a href="{WEBURLPATH}/coupon.php?action=view&id={$coupon[id]}" class="tit" title="{$coupon[name]}">{$coupon[name]}</a>
					<span class="couponTit" title="">￥{$coupon[price]}元</span>
					<span class="price">原价：￥{$coupon[original]}<br />折扣：{$coupon[discount]}折</span>
				</li>
				{/loop}
			</ul>
		</div>
	</div>
<!--{else}-->

<script language="javascript" type="text/javascript">
$(document).ready(function() {
	$("#companySortBox .leftNav li").hover(
		function(){
			$(this).addClass("current");
			$(this).find(".leftSubNav").css("top",$(this).index()*28+91);
			$(this).find(".leftSubNav").show();
		},
		function(){
			$(this).removeClass("current");
			$(this).find(".leftSubNav").hide();
		}
	);
});

function switchHotCoupon(obj, type) {
	$('.hotCoupon .cont').hide();
	$('.hotCoupon ul li').removeClass('current');
	var id = 'hotCoupon_' + type;
	$('#'+id).show();
	$(obj).parent().addClass('current');
}
</script>

<div id="positionBox">
	<div class="left">
		<a href="{WEBURLPATH}/index.php">首页</a>&gt;
		<a href="{WEBURLPATH}/coupon.php">优惠奖券</a>
	</div>
</div>

<div class="mainarea">
	<div class="left">
		<div id="companySortBox">
			<dl>
				<dt><a href="{$webglobal['file_coupon']['allCategoryUrl']}">优惠劵分类</a></dt>
				<dd>
					<ul class="leftNav">
					{loop $webglobal['couponCategory'] $categoryid $category}
						<li>
							<a href="{$category[url]}"{if in_array($categoryid, $webglobal['file_coupon']['selectcategory'])} class="select"{/if}>{$category[name]}</a>
							{if $category[second]}
							<ul class="leftSubNav">
							{loop $category[second] $subcategoryid $subcategory}
								<li><a href="{$subcategory['url']}"{if in_array($subcategoryid, $webglobal['file_coupon']['selectcategory'])} class="select"{/if}>{$subcategory[name]}</a></li>
							{/loop}
							</ul>
							{/if}
						</li>
					{/loop}
					{if $webglobal[file_coupon][areadata]}
						<li>
							<a href="{$webglobal['file_coupon']['allAreaUrl']}" class="current">全部商圈</a>
						</li>
						{loop $webglobal[file_coupon][areadata] $areaid $area}
						<li>
							<a href="{$area[url]}"{if in_array($areaid, $webglobal['file_coupon']['selectarea'])} class="select"{/if}>{$area[name]}</a>
							{if $area[second]}
							<ul class="leftSubNav">
							{loop $area[second] $subareaid $subarea}
								<li><a href="{$subarea['url']}"{if in_array($subareaid, $webglobal['file_coupon']['selectarea'])} class="select"{/if}>{$subarea[name]}</a></li>
							{/loop}
							</ul>
							{/if}
						</li>
						{/loop}
					{/if}
					</ul>
				</dd>
			</dl>
		</div>
		<div class="couponLeftProBox"><img src="{WEBURLPATH}/images/ad06.jpg" alt="" /></div>
	</div>
	<div class="topContMid">
		<div class="couponSearchBox">
			<form method="post" name="search" id="search" action="{WEBURLPATH}/coupon.php" class="left">
				{loop $webglobal['file_coupon']['urlParams'] $field $value}
				{if $field != 's'}
				<input type="hidden" name="{$field}" value="{$value}" />
				{/if}
				{/loop}
				<input class="txtIpt" type="text" name="s" value="{$webrequest['s']}" />
				<input class="btnIpt" type="submit" value="" />
			</form>
			<div class="right">
				每页显示：
				{loop $webglobal['file_coupon']['pageLimit'] $pagelimit}
				<a href="{$pagelimit[url]}"{if $pagelimit['checked']} class="checked"{/if}>$pagelimit[title]</a>
				{/loop}
			</div>
		</div>
		{if $webglobal['file_coupon']['datanum'] > 0}
			<ul class="couponList">
				{loop $webglobal['file_coupon']['dataarray'] $tempkey $tempdata}
				<li>
					<a href="{WEBURLPATH}/coupon.php?action=view&id={$tempdata[id]}" class="img"><img src="{WEBURLPATH}{if $tempdata['image']!= ''}{$tempdata['thumbnail']['small']}{else}/images/nopic.png{/if}" width="205" height="133" alt="{$tempdata['name']}" title="{$tempdata['name']}"></a>
					<span class="priceBefore">折前￥{$tempdata['original']}</span>
					<span class="priceAfter">{$tempdata['price']}</span>
					<p class="tit"><a href="{WEBURLPATH}/coupon.php?action=view&id={$tempdata[id]}">{$tempdata['name']}</a>有效期为：{$tempdata['endtime_show']}</p>
					<p class="abstract">{$tempdata['introduction']}</p>
				</li>
				{/loop}
			</ul>
			{template page}
		{else}
			<div class="noResult">
				<p class="tip">没有找到满足条件的优惠劵，试试重新搜索：</p>
				<p class="Color7">• 确认拼写没有错误</p>
				<p class="Color7">• 确认频道没有选错</p>
				<p class="Color7">• 精简查询内容，尽量使用最主要的字词</p>
			</div>
		{/if}
	</div>
	<div class="topContRight">
		<div class="topRightProBoxc"><img src="{WEBURLPATH}/images/ad07.jpg" alt="" /></div>
		<div class="hotCoupon">
			<div class="tit">
				<a href="#" class="left">热门优惠券</a>
				<ul>
					<li class="current"><a href="javascript:void(0)" onclick = "javascript:switchHotCoupon(this, 'day');">日</a></li>
					<li><a href="javascript:void(0)" onclick = "javascript:switchHotCoupon(this, 'week');">周</a></li>
					<li><a href="javascript:void(0)" onclick = "javascript:switchHotCoupon(this, 'month');">月</a></li>
				</ul>
			</div>
			<ul class="cont" id="hotCoupon_day">
				{loop $webcache[hotcoupon][day] $couponid $coupon}
				<li>
					<a href="{WEBURLPATH}/coupon.php?action=view&id={$couponid}" class="img"><img src="{WEBURLPATH}{if $coupon[image] != ''}{$coupon[image]}{else}/images/nopic-small.png{/if}" alt="" /></a>
					<a href="{WEBURLPATH}/coupon.php?action=view&id={$couponid}" class="tit" title="{$coupon[name]}">{$coupon[name]}</a>
					<span class="couponTit" title="">￥{$coupon[price]}元</span>
					<span class="price">原价：￥{$coupon[original]}<br />折扣：{$coupon[discount]}折</span>
				</li>
				{/loop}
			</ul>
			<ul class="cont" id="hotCoupon_week" style="display:none">
				{loop $webcache[hotcoupon][week] $couponid $coupon}
				<li>
					<a href="{WEBURLPATH}/coupon.php?action=view&id={$couponid}" class="img"><img src="{WEBURLPATH}{if $coupon[image] != ''}{$coupon[image]}{else}/images/nopic-small.png{/if}" alt="" /></a>
					<a href="{WEBURLPATH}/coupon.php?action=view&id={$couponid}" class="tit" title="{$coupon[name]}">{$coupon[name]}</a>
					<span class="couponTit" title="">￥{$coupon[price]}元</span>
					<span class="price">原价：￥{$coupon[original]}<br />折扣：{$coupon[discount]}折</span>
				</li>
				{/loop}
			</ul>
			<ul class="cont" id="hotCoupon_month" style="display:none">
				{loop $webcache[hotcoupon][month] $couponid $coupon}
				<li>
					<a href="{WEBURLPATH}/coupon.php?action=view&id={$couponid}" class="img"><img src="{WEBURLPATH}{if $coupon[image] != ''}{$coupon[image]}{else}/images/nopic-small.png{/if}" alt="" /></a>
					<a href="{WEBURLPATH}/coupon.php?action=view&id={$couponid}" class="tit" title="{$coupon[name]}">{$coupon[name]}</a>
					<span class="couponTit" title="">￥{$coupon[price]}元</span>
					<span class="price">原价：￥{$coupon[original]}<br />折扣：{$coupon[discount]}折</span>
				</li>
				{/loop}
			</ul>
		</div>
		<div class="couponHotNews">
			<div class="tit"><a href="#" class="left">热点信息</a></div>
			<ul class="cont">
				{loop $webglobal['file_coupon']['hotnews'] $newskey $news}
				<li><a href="#">[{$news['typelink']}]</a>{$news['textlink']}</li>
				{/loop}
			</ul>
		</div>
	</div>
</div>

<!--{/if}-->
{template footer}